#define DEBUG
#include <cstdio>
#define MODS 1000000007

using namespace std;

int main() {
#ifdef DEBUG
  freopen("0.in", "r", stdin);
  freopen("0.out", "w", stdout);
#endif

  int r, c, mint, maxt;
  scanf("%d %d %d %d", &r, &c, &mint, &maxt);
  long long ans=0;
  for (int i=2; i<=r; i++) {
    for (int j=2; j<=c; j++) {
      int cnt=i*2+j*2-4;
      if (cnt>=mint && cnt<=maxt) {
	ans = (ans+(long long)(r-i+1)*(c-j+1)%MODS*(i-2)%MODS*(j-2)%MODS*6LL%MODS)%MODS;
      }
    }
  }
  printf("%lld", ans);

  return 0;
}
